install.packages("haven")
install.packages("panelView")

library(panelView)
library(haven)

# note: remember to set the working directory
# setwd("")
d <- read_dta("data.dta")

panelview(turnout ~ isproportional,
          data = d,
          index = c("province","year"),
          ylab = "",
          xlab = "",
          axis.lab.gap = c(0,0),
          main = "",
          color=c("black","gray56","gray88"),
          background="white",
          legend.labs=c("Plurality rules","Incomplete list","No elections held"))
